package com.liaozibo.demo.seckill.support.service;

import com.liaozibo.demo.seckill.support.export.dto.ActivityDTO;

public interface ActivityService {
    ActivityDTO getActivityById(Integer id);

    /**
     * 查询查询正在进行的最新活动
     * */
    ActivityDTO getActivityByCode(String code);

    /**
     * 查询商品最新活动
     * */
    ActivityDTO getActivityByCondition(String code, Integer status);

    void createActivity(ActivityDTO activityDTO);

    void startActivity(String code);

    void endActivity(String code);

    void decrementStock(String code, Integer num);
}
